package com.lzy.cloud.goods.service.GoodsServiceImpl;

import com.lzy.cloud.goods.dtos.TimeDto;
import com.lzy.cloud.goods.entity.Time;
import com.lzy.cloud.goods.mapper.TimeMapperExt;
import com.lzy.cloud.goods.service.TimeService;
import com.lzy.framework.core.utils.DozerUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 商品清洁时间
 *
 * @author lc
 * @version 2018/8/6
 */
@Service
public class TimeServiceimpl implements TimeService {

    @Autowired
    private TimeMapperExt timeMapperExt;

    @Override
    public Boolean addTime(TimeDto timeDto) {
        return timeMapperExt.insertSelective(DozerUtils.map(timeDto,Time.class))>0;
    }

    @Override
    public List<TimeDto> selectList(TimeDto dto) {
        return timeMapperExt.selectList(dto);
    }
}
